<template>
    <div>
        <button @click="add">+ 1</button>
        <button>- 1</button>
    </div>
</template>

<script>
export default {
    methods: {
        add() {
            // this.$store.commit('addNum', { num: 20 });
            this.$store.commit({
                type: 'addNum',
                num: 50
            });
            // this.$store.state.num++;
        }
    }
};
</script>

<style></style>
